import QtQuick 1.0

Rectangle {
    id: rect
    width: 400; height: 200
    radius: 0
    color: "gray"

    ListModel{
        id: barIcons
        ListElement { name: "Task"; icon: "task.png" }
        ListElement { name: "Memo"; icon: "Memo.png" }
        ListElement { name: "Meeting"; icon: "meeting.png" }
        ListElement { name: "To Do's"; icon: "ToDo.png" }
        ListElement { name: "Anniversary"; icon: "anniversary.png" }
        ListElement { name: "Twitter"; icon: "twitter.png" }
        ListElement { name: "Facebook"; icon: "facebook.png" }
    }
    Component {
        id: appDelegate
        Item {
            width: 200; height: 200
            scale: PathView.iconScale

            // images
            Image {
                id: myIcon
                y: 40; anchors.horizontalCenter: parent.horizontalCenter
                source: icon
                smooth: true
            }
            // bottom lable
            Text {
                anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
                text: name
                font.pointSize: 3
                smooth: true

            }
            MouseArea {
                anchors.fill: parent
            }

        }
    }
    PathView {

        id: view
        anchors.fill: parent
        preferredHighlightBegin: 0.5
        preferredHighlightEnd: 0.5
        focus: true
        model: barIcons
        delegate: appDelegate
        path: Path {
            startX: 10
            startY: 70
            PathAttribute { name: "iconScale"; value: 0.5 }

            PathQuad { x: 200; y: 70; controlX: 50; controlY: 70 }
            PathAttribute { name: "iconScale"; value: 1 }
            PathQuad { x: rect.width; y: 70; controlX: 350; controlY: 70 }
            PathAttribute { name: "iconScale"; value: 0.4 }
            /*      startX: 10
            startY: 70
            PathAttribute { name: "iconScale"; value: 1 }
            PathQuad { x: rect.width; y: 70; controlX: rect.width/2; controlY: 70 }
            */
        }
    }
}
